home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.7 KB | 43 lines | [TEXT/GEOL] |
- Item 1376422 10-July-90 15:06PDT
-
- From: PILLAR.CORP Pillar, Chris Ovard,PRT
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: Non-scaled margins
-
- I am working on an application where the user can specify margins for printed
- output in inches. I would like these margins to be accurate regardless of any
- scaling the user specifies in the page setup dialog. For example if the user
- says to allow a 1 inch margin and to scale the output 50% the output should
- have a 1 inch margin, not a 0.5 inch margin. With MacApp 2.0B9 this was a
- simple enough thing to do, the print handler's fMarginRes field contained the
- number of effective pixels per inch taking into account the scaling.
- TStdPrintHandler.CheckPrinter calculated fMarginRes using some undocumented
- fields of the print record. In 2.0 Final this magic bit of code has been
- commented out of TStdPrintHandler.CheckPrinter:
-
- >{$IFC FALSE}
- > { This *old* computation for fMarginRes doesn't work with the current printer
- > drivers, so use prInfo's iHRes & iVRes. It's conceivable that this
- > computation was correct for some *older* versions of the printer drivers.
- > But what versions???
- > NOTE: the Print Shop recommends always using the latest version of the
- > print drivers, even with older systems. }
- > WITH fPageAreas.thePaper, fMarginRes DO
- > BEGIN
- > h := (IntMultiply(iPrPgFract, right - left)) DIV prStl.iPageH;
- > v := (IntMultiply(iPrPgFract, bottom - top)) DIV prStl.iPageV;
- > END;
- >{$ENDC}
-
- Does anyone know of a legitimate way to accurately measure the size of margins
- in inches?
-
- Thanks,
-
- Steve Curry,
- Pillar Corporation
- Pillar.Corp
-
-